
using System;
using LastFMGenNHibernate.EN.LastFM;
using LastFMGen_LastFMWCF.DTO.LastFM;

namespace LastFMGen_LastFMWCF.Adapters.LastFM
{
        public class ComentarioAdapter {
        public static ComentarioDTO Convert (ComentarioEN en)
        {
                ComentarioDTO newinstance = null;

                if (en != null) {
                        newinstance = new ComentarioDTO ();



                        newinstance.Id = en.Id;
                        newinstance.Comment = en.Comment;
                        if (en.Evento != null) {
                                newinstance.Evento_oid = en.Evento.Id;
                        }
                        if (en.Cancion != null) {
                                newinstance.Cancion_oid = en.Cancion.Id;
                        }
                }

                return newinstance;
        }
        }
}
